-- GENERATED SPELL FOR [Avatar of the Martyred] --


function spell0_18478(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(16856,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18478', 5311, 1)
end

function spell1_18478(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(16145,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18478', 30323, 1)
end

function Sorts_18478(pUnit, Event)
local choix_sorts_18478 = math.random(0, 1)
if choix_sorts_18478 == 0 then
pUnit:RegisterEvent('spell0_18478', 1, 1)
end
if choix_sorts_18478 == 1 then
pUnit:RegisterEvent('spell1_18478', 1, 1)
end
end

function mob18478_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18478', math.random(1500, 3000), 1)
end

function mob18478_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18478_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18478_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18478, 1, 'mob18478_Action')
RegisterUnitEvent(18478, 2, 'mob18478_Leave')
RegisterUnitEvent(18478, 3, 'mob18478_Kill')
RegisterUnitEvent(18478, 4, 'mob18478_Die')
